<?php foreach ($this->search_result AS $key => $val) { ?>
<li class="<?php if ($val['type'] == 1) { ?>qs<?php } ?><?php if ($val['detail']['best_answer'] > 0 AND $val['type'] == 1) { ?> winner<?php } ?>"<?php if ($val['focus']) { ?> focus="true"<?php } ?>>
<?php if ($val['type'] == 1) { ?>
	<p class="u_user i_gltxtHide keyword"><a href="<?php echo $val['url']; ?>" target="_blank"><?php echo $val['name']; ?></a></p>
	<p class="i_gltxtHide"><a href="<?php echo $val['url']; ?>" class="gray_bg i_cl_02 i_radiu3">站点</a> &nbsp; <?php echo $val['detail']['answer_count']; ?> 个回复 &nbsp; • &nbsp; <?php echo $val['detail']['focus_count']; ?> 人关注</p>
	<?php if($this->user_id){ ?>
		<a href="javascript:;" onclick="focus_question($(this), $(this), <?php echo $val['sno']; ?>);" class="i_but i_green_bt2 i_pas<?php if ($val['focus']) { ?> cur<?php } ?>"><?php if ($val['focus']) { ?>取消<?php } ?>关注</a>
	<?php } ?>
<?php } else if ($val['type'] == 2) { ?>
	<p class="u_user i_gltxtHide keyword"><a href="<?php echo $val['url']; ?>" target="_blank"><?php echo $val['name']; ?></a></p>
	<p class="i_gltxtHide"><a href="<?php echo $val['url']; ?>" class="gray_bg i_cl_02 i_radiu3">标签</a> &nbsp; <?php echo $val['detail']['discuss_count']; ?> 个站点 &nbsp; • &nbsp; <?php echo $val['detail']['focus_count']; ?> 人关注</p>
	<a class="i_imgforUser i_pas" href="<?php echo $val['url']; ?>"><img src="<?php echo $val['detail']['topic_pic']; ?>" alt="<?php echo $val['name']; ?>"></a>
	<?php if($this->user_id){ ?>
		<a href="javascript:;" class="i_but i_green_bt2 i_pas<?php if ($val['focus']) { ?> cur<?php } ?>" onclick="focus_topic($(this), $(this), <?php echo $val['sno']; ?>);"><?php if ($val['focus']) { ?>取消<?php } ?>关注</a>
	<?php } ?>
<?php } else if ($val['type'] == 3) { ?>
	<p class="u_user i_gltxtHide keyword"><a href="<?php echo $val['url']; ?>" target="_blank"><?php echo $val['name']; ?></a></p>
	<p class="i_gltxtHide"><a href="<?php echo $val['url']; ?>" class="gray_bg i_cl_02 i_radiu3">用户</a> &nbsp; <?php echo $val['detail']['reputation']; ?> 分威望 &nbsp; • &nbsp; <?php echo $val['detail']['agree_count']; ?> 个赞同 &nbsp; • &nbsp; <?php echo $val['detail']['thanks_count']; ?> 个感谢 &nbsp; • &nbsp; <?php echo $val['detail']['focus_count']; ?> 人关注</p>
	<a class="i_imgforUser i_pas" href="<?php echo $val['url']; ?>"><img src="<?php echo get_avatar_url($val['sno'], 'mid'); ?>" alt="<?php echo $val['name']; ?>"></a>
	<?php if($this->user_id){ ?>
		<a href="javascript:;" class="i_but i_green_bt2 i_pas<?php if ($val['focus']) { ?> cur<?php } ?>" onclick="follow_people($(this), $(this), <?php echo $val['sno']; ?>);"><?php if ($val['focus']) { ?>取消<?php } ?>关注</a>
	<?php } ?>
<?php } ?>
</li>
<?php } ?>